<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./css/dome.css" />
  </head>
  <body>
    <div class="box" id="dome">
      <div class="header">
        <img src="./mages/1.png" alt="" />
      </div>
      <div class="nav">
        <ul>
          <li>
            <div class="btn1"></div>
            <a href="#xi">西双版纳概况</a>
          </li>
          <li>
            <div class="btn2"></div>
            <a href="#chuang">创建动态</a>
          </li>
          <li>
            <div class="btn3"></div>
            <p>示范单位</p>
          </li>

          <li>
            <div class="btn4"></div>
            <p>民族风采</p>
          </li>
        </ul>
      </div>
      <div class="lun">
        <img src="./mages/lun.png" alt="" srcset="" />
      </div>
      <!-- 示范单位 -->

      <div class="shifan">
        <div class="text">
          <h3>示范单位</h3>
        </div>
      </div>
      <div class="domes">
        <div class="dome1" :key="item.id" v-for="item in domes">
          <img :src=item.img alt="" id="xi"/ >
          <a href="#">
            {{item.name[1]}}
            <p>{{item.name[0]}}</p>
          </a>
        </div>
      </div>
      <div class="btn">
        <button>查看更多>></button>
      </div>
      <!-- 因为是先写出效果，然后再替换数据的，下面一样的就不再替换了，方法一样的，偷一下懒 -->
      <!-- 民族风采 -->
      <div class="shifan fengcai">
        <div class="text">
          <h3>民族风采</h3>
        </div>
      </div>
      <div class="domes">
        <div class="dome1">
          <img src="./mages/demo2-1.png" alt="" />
          <a href="#" class="text"> 双西版纳-汉族 </a>
        </div>
        <div class="dome1">
          <img src="./mages/demo2-2.png" alt="" />
          <a href="#" class="text"> 双西版纳-傣族 </a>
        </div>
        <div class="dome1">
          <img src="./mages/dome2-3.png" alt="" />
          <a href="#" class="text"> 双西版纳-哈尼族 </a>
        </div>

        <div class="dome1">
          <img src="./mages/demo2-4.png" alt="" />
          <a href="#" class="text"> 双西版纳-布朗族 </a>
        </div>
        <div class="dome1">
          <img src="./mages/demo2-5.png" alt="" />
          <a href="#" class="text"> 双西版纳-基诺族 </a>
        </div>
        <div class="dome1">
          <img src="./mages/demo2-6.png" alt="" />
          <div><a href="#" class="text"> 双西版纳-彝族 </a></div>
        </div>
      </div>
      <!-- 查看更多 -->
      <div class="btn">
        <button>查看更多>></button>
      </div>
      <!-- 创建动态 -->
      <div class="shifan" id="chuang">
        <div class="text">
          <h3>创建动态</h3>
        </div>
      </div>
      <!-- cboxs -->
      <div class="cbxs">
        <div class="cbox">
          <div class="leftbox">
            <div class="leftop">
              <h2>构建民族地区新发展格局</h2>
            </div>
            <div class="lefboomt">
              {{date | fromat('yyyy-MM-dd')}}
              <div class="lefboomt-right">
                <div class="chak">
                  <div
                    style="
                      background-image: url(./mages/chakan.png);
                      width: 30px;
                      height: 30px;
                    "
                  ></div>
                  9
                  <div
                    style="
                      background-image: url(./mages/zang.png);
                      width: 30px;
                      height: 30px;
                    "
                  ></div>
                  2
                </div>
              </div>
            </div>
          </div>
          <div class="rightbox">
            <img src="./mages/tuanjie.png" alt="" srcset="" />
          </div>
        </div>
        <div class="cbox cbox2"></div>

        <div class="cbox cbox2">
          <div class="top">
            <h2>构建民族地区新发展格局</h2>
          </div>
          <div class="boomt">
            <div class="boomt-left">{{date | fromat('yyyy-MM-dd')}}</div>
            <div class="boomt-right">
              <div class="chak">
                <div
                  style="
                    background-image: url(./mages/chakan.png);
                    width: 30px;
                    height: 30px;
                  "
                ></div>
                9
                <div
                  style="
                    background-image: url(./mages/zang.png);
                    width: 30px;
                    height: 30px;
                  "
                ></div>
                2
              </div>
            </div>
          </div>
        </div>
        <div class="cbox cbox2"></div>
        <div class="cbox">
          <div class="leftbox">
            <div class="leftop">
              <h2>构建民族地区新发展格局</h2>
            </div>
            <div class="lefboomt">
              {{date | fromat('yyyy-MM-dd')}}
              <div class="lefboomt-right">
                <div class="chak">
                  <div
                    style="
                      background-image: url(./mages/chakan.png);
                      width: 30px;
                      height: 30px;
                    "
                  ></div>
                  9
                  <div
                    style="
                      background-image: url(./mages/zang.png);
                      width: 30px;
                      height: 30px;
                    "
                  ></div>
                  2
                </div>
              </div>
            </div>
          </div>
          <div class="rightbox">
            <img src="./mages/tuanjie.png" alt="" srcset="" />
          </div>
        </div>
        <!--  -->
        <div class="cbox cbox2"></div>

        <div class="cbox cbox2">
          <div class="top">
            <h2>构建民族地区新发展格局</h2>
          </div>
          <div class="boomt">
            <div class="boomt-left">{{date | fromat('yyyy-MM-dd')}}</div>

            <div class="boomt-right">
              <div class="chak">
                <div
                  style="
                    background-image: url(./mages/chakan.png);
                    width: 30px;
                    height: 30px;
                  "
                ></div>
                9
                <div
                  style="
                    background-image: url(./mages/zang.png);
                    width: 30px;
                    height: 30px;
                  "
                ></div>
                2
              </div>
            </div>
          </div>
        </div>

        <div class="cbox cbox2"></div>

        <div class="cbox cbox2">
          <div class="top">
            <h2>构建民族地区新发展格局</h2>
          </div>
          <div class="boomt">
            <div class="boomt-left">{{date | fromat('yyyy-MM-dd')}}</div>

            <div class="boomt-right">
              <div class="chak">
                <div
                  style="
                    background-image: url(./mages/chakan.png);
                    width: 30px;
                    height: 30px;
                  "
                ></div>
                9
                <div
                  style="
                    background-image: url(./mages/zang.png);
                    width: 30px;
                    height: 30px;
                  "
                ></div>
                2
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="btn">
        <button>查看更多>></button>
      </div>
      <!-- 底部导航栏 -->
      <div class="boomtnav">
        <div class="box"><img src="./mages/box1.png" alt="" srcset="" /></div>
        <div class="box"><img src="./mages/box2.png" alt="" srcset="" /></div>
        <div class="box"><img src="./mages/box3.png" alt="" srcset="" /></div>
        <div class="box"><img src="./mages/box4.png" alt="" srcset="" /></div>
        <div class="box"><img src="./mages/box5.png" alt="" /></div>
      </div>
    </div>
  </body>
  <script src="./js/vue.js"></script>
  <script src="./js/dome.js"></script>
  <script>
    Vue.filter('fromat', function (value, age) {
      // yyyy-mm-dd
      if (age == 'yyyy-MM-dd') {
        var date =
          value.getMonth() +
          '月' +
          value.getDate() +
          '日  ' +
          value.getHours() +
          ':' +
          value.getMinutes() +
          value.getSeconds()
        return date
      }
    })

    var vm = new Vue({
      el: '#dome',
      data: {
        date: new Date(),
        id: '',
        name: '',
        img: '',
        domes: [],
      },
      mounted: function () {
        // 该生命周期钩子函数被触发的时候，模板已经可以使用
        // 一般此时用于获取后台数据，然后把数据填充到模板
        var data = [
          {
            id: 1,
            name: ['西双版纳傣族自治州', ' 国家级.'],
            img: './mages/dome1.png',
          },
          {
            id: 2,
            name: ['孟海县打洛边防检查站', ' 国家级.'],
            img: './mages/dome2.png',
          },
          {
            id: 3,
            name: ['西双版纳傣族自治州', ' 国家级.'],
            img: './mages/dome3.png',
          },
          {
            id: 4,
            name: ['西双版纳傣族自治州', ' 国家级.'],
            img: './mages/dome4.png',
          },
          {
            id: 5,
            name: ['西双版纳傣族自治州', ' 国家级.'],
            img: './mages/dome5.png',
          },
          {
            id: 6,
            name: ['西双版纳傣族自治州', ' 国家级.'],
            img: './mages/dome6.png',
          },
        ]
        this.domes = data
      },
    })
  </script>
</html>
